*/
#include "config.h"
+
#include "gtkaspectframe.h"
+
+#include "gtksizerequest.h"
+
#include "gtkprivate.h"
#include "gtkintl.h"
{
GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (child_requisition.height != 0)
{
ratio = ((gdouble) child_requisition.width /
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtksizegroup.h"
+#include "gtksizerequest.h"
#include "gtkstock.h"
#include "gtkintl.h"
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
/* Header */
- gtk_widget_get_child_requisition (priv->header_image, &header_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->header_image),
+ &header_requisition, NULL);
header_allocation.x = border_width + header_padding;
header_allocation.y = border_width + header_padding;
gtk_widget_size_allocate (priv->header_image, &header_allocation);
/* Action area */
- gtk_widget_get_child_requisition (priv->action_area, &action_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->action_area),
+ &action_requisition, NULL);
child_allocation.x = border_width;
child_allocation.y = allocation->height - border_width - action_requisition.height;
gtk_widget_get_allocation (priv->action_area, &action_area_allocation);
/* Sidebar */
- gtk_widget_get_child_requisition (priv->sidebar_image, &sidebar_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->sidebar_image),
+ &sidebar_requisition, NULL);
if (rtl)
child_allocation.x = allocation->width - border_width - sidebar_requisition.width;
*/
#include "config.h"
+
#include "gtkbbox.h"
+
#include "gtkorientable.h"
#include "gtkprivate.h"
+#include "gtksizerequest.h"
+
#include "gtkintl.h"
if (is_secondary)
nsecondaries++;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (homogeneous || (child_requisition.width + ipad_w < avg_w * 1.5))
{
*/
#include "config.h"
+
#include "gtkcheckbutton.h"
+
#include "gtklabel.h"
+#include "gtksizerequest.h"
+
#include "gtkprivate.h"
#include "gtkintl.h"
GtkRequisition child_requisition;
guint border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- gtk_widget_get_child_requisition (child, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+
child_allocation.width = MIN (child_requisition.width,
allocation->width -
((border_width + focus_width + focus_pad) * 2
#include "gtkseparatormenuitem.h"
#include "gtkselection.h"
#include "gtksettings.h"
+#include "gtksizerequest.h"
#include "gtkspinbutton.h"
#include "gtkstock.h"
#include "gtktextutil.h"
gint frame_height;
gint xborder, yborder;
- gtk_widget_get_child_requisition (widget, &requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
+ &requisition, NULL);
gtk_widget_get_allocation (widget, &allocation);
_gtk_entry_get_borders (entry, &xborder, &yborder);
GtkRequisition requisition;
GtkWidget *widget = GTK_WIDGET (entry);
- gtk_widget_get_child_requisition (widget, &requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
+ &requisition, NULL);
gtk_widget_get_allocation (widget, &allocation);
if (x)
if (gtk_widget_get_realized (widget))
{
- /* We call gtk_widget_get_child_requisition, since we want (for
- * backwards compatibility reasons) the realization here to
- * be affected by the usize of the entry, if set
- */
gint x, y, width, height;
GtkEntryCompletion* completion;
{
GtkRequisition label_requisition;
- gtk_widget_get_child_requisition (priv->label_widget, &label_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->label_widget),
+ &label_requisition, NULL);
label_height = label_requisition.height;
}
else
*/
#include "config.h"
+
#include "gtkfixed.h"
+
+#include "gtksizerequest.h"
+
#include "gtkprivate.h"
#include "gtkintl.h"
if (gtk_widget_get_visible (child->widget))
{
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_requisition, NULL);
child_allocation.x = child->x + border_width;
child_allocation.y = child->y + border_width;
GtkWidget *preview_entry = priv->preview_entry;
const gchar *text;
- gtk_widget_get_child_requisition (preview_entry, &old_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (preview_entry),
+ &old_requisition, NULL);
+
rc_style = gtk_rc_style_new ();
rc_style->font_desc = gtk_font_selection_get_font_description (fontsel);
child = gtk_bin_get_child (bin);
if (child)
- gtk_widget_get_child_requisition (child, &child_requisition);
+ {
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+ }
else
{
child_requisition.width = 0;
priv->child_detached = TRUE;
if (child)
- gtk_widget_get_child_requisition (child, &child_requisition);
+ {
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+ }
else
{
child_requisition.width = 0;
*/
#include "config.h"
+
#include "gtkimagemenuitem.h"
+
#include "gtkaccellabel.h"
-#include "gtkintl.h"
#include "gtkstock.h"
#include "gtkiconfactory.h"
#include "gtkimage.h"
#include "gtkcontainer.h"
#include "gtkwindow.h"
#include "gtkactivatable.h"
+#include "gtksizerequest.h"
+
+#include "gtkintl.h"
#include "gtkprivate.h"
{
GtkRequisition image_requisition;
guint toggle_spacing;
- gtk_widget_get_child_requisition (priv->image,
- &image_requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->image),
+ &image_requisition, NULL);
gtk_widget_style_get (GTK_WIDGET (menu_item),
"toggle-spacing", &toggle_spacing,
* come up with a solution that's really better.
*/
- gtk_widget_get_child_requisition (priv->image,
- &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->image),
+ &child_requisition, NULL);
gtk_widget_get_allocation (widget, &widget_allocation);
*/
#include "config.h"
-#include "gdkconfig.h"
#include "gtklayout.h"
+
+#include "gdkconfig.h"
+
+#include "gtksizerequest.h"
+
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
allocation.x = child->x;
allocation.y = child->y;
- gtk_widget_get_child_requisition (child->widget, &requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &requisition, NULL);
allocation.width = requisition.width;
allocation.height = requisition.height;
*/
#include "config.h"
+
+#include "gtkmenubar.h"
+
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
-#include "gtkmenubar.h"
#include "gtkmenuitem.h"
#include "gtkmenuprivate.h"
#include "gtksettings.h"
-#include "gtkintl.h"
+#include "gtksizerequest.h"
#include "gtkwindow.h"
+
+#include "gtkintl.h"
#include "gtkprivate.h"
#define BORDER_SPACING 0
gtk_menu_item_toggle_size_request (GTK_MENU_ITEM (child),
&toggle_size);
- gtk_widget_get_child_requisition (child, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+
if (priv->child_pack_direction == GTK_PACK_DIRECTION_LTR ||
priv->child_pack_direction == GTK_PACK_DIRECTION_RTL)
child_requisition.width += toggle_size;
gtk_menu_item_toggle_size_request (GTK_MENU_ITEM (child),
&toggle_size);
- gtk_widget_get_child_requisition (child, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+
if (priv->child_pack_direction == GTK_PACK_DIRECTION_LTR ||
priv->child_pack_direction == GTK_PACK_DIRECTION_RTL)
child_requisition.width += toggle_size;
child_allocation.x += allocation->x;
child_allocation.y += allocation->y;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (menu_item->submenu && menu_item->show_submenu_indicator)
{
if (direction == GTK_TEXT_DIR_RTL)
#include "config.h"
+#include "gtknotebook.h"
+
#include <stdio.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
-#include "gtknotebook.h"
#include "gtkmain.h"
#include "gtkmenu.h"
#include "gtkmenuitem.h"
#include "gtklabel.h"
+#include "gtksizerequest.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkbindings.h"
widget_allocation.y = allocation->y + border_width;
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
- gtk_widget_get_child_requisition (priv->action_widget[i], &requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->action_widget[i]),
+ &requisition, NULL);
switch (tab_pos)
{
xthickness = style->xthickness;
ythickness = style->ythickness;
- gtk_widget_get_child_requisition (page->tab_label, &tab_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (page->tab_label),
+ &tab_requisition, NULL);
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
"tab-curvature", &tab_curvature,
#include "config.h"
+#include "gtkpaned.h"
+
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkorientable.h"
-#include "gtkpaned.h"
+#include "gtksizerequest.h"
#include "gtkwindow.h"
+
#include "gtkprivate.h"
#include "gtkintl.h"
gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
- gtk_widget_get_child_requisition (priv->child1, &child1_requisition);
- gtk_widget_get_child_requisition (priv->child2, &child2_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->child1),
+ &child1_requisition, NULL);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->child2),
+ &child2_requisition, NULL);
old_handle_pos = priv->handle_pos;
*/
#include "config.h"
-#include <string.h>
+
#include "gtkpathbar.h"
+
+#include <string.h>
+
#include "gtktogglebutton.h"
#include "gtkalignment.h"
#include "gtkarrow.h"
#include "gtkhbox.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
+#include "gtksizerequest.h"
enum {
{
child = BUTTON_DATA (list->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
width += child_requisition.width + path_bar->spacing;
if (list == path_bar->fake_root)
* button, then count backwards.
*/
/* Count down the path chain towards the end. */
- gtk_widget_get_child_requisition (BUTTON_DATA (first_button->data)->button, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (BUTTON_DATA (first_button->data)->button),
+ &child_requisition, NULL);
width = child_requisition.width;
list = first_button->prev;
{
child = BUTTON_DATA (list->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (width + child_requisition.width +
path_bar->spacing + slider_space > allocation_width)
{
child = BUTTON_DATA (first_button->next->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (width + child_requisition.width + path_bar->spacing + slider_space > allocation_width)
{
button_data = BUTTON_DATA (list->data);
child = button_data->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
child_allocation.width = MIN (child_requisition.width,
allocation_width - (path_bar->spacing + path_bar->slider_width) * 2);
GtkRequisition vscrollbar_requisition;
gboolean is_rtl;
- gtk_widget_get_child_requisition (priv->vscrollbar,
- &vscrollbar_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->vscrollbar),
+ &vscrollbar_requisition, NULL);
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
if ((!is_rtl &&
if (priv->hscrollbar_visible)
{
GtkRequisition hscrollbar_requisition;
- gtk_widget_get_child_requisition (priv->hscrollbar,
- &hscrollbar_requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->hscrollbar),
+ &hscrollbar_requisition, NULL);
if (priv->real_window_placement == GTK_CORNER_BOTTOM_LEFT ||
priv->real_window_placement == GTK_CORNER_BOTTOM_RIGHT)
if (priv->hscrollbar_visible)
{
GtkRequisition hscrollbar_requisition;
- gtk_widget_get_child_requisition (priv->hscrollbar,
- &hscrollbar_requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->hscrollbar),
+ &hscrollbar_requisition, NULL);
if (!gtk_widget_get_visible (priv->hscrollbar))
gtk_widget_show (priv->hscrollbar);
if (!gtk_widget_get_visible (priv->vscrollbar))
gtk_widget_show (priv->vscrollbar);
- gtk_widget_get_child_requisition (priv->vscrollbar,
- &vscrollbar_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->vscrollbar),
+ &vscrollbar_requisition, NULL);
if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL &&
(priv->real_window_placement == GTK_CORNER_TOP_RIGHT ||
*/
#include "config.h"
+
#include "gtktable.h"
+
#include "gtkprivate.h"
+#include "gtksizerequest.h"
#include "gtkintl.h"
if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_requisition, NULL);
/* Child spans a single column.
*/
{
GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_requisition, NULL);
+
/* Check and see if there is already enough space
* for the child.
*/
{
GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_requisition, NULL);
/* Check and see if there is already enough space
* for the child.
GtkRequisition child_requisition;
guint border_width;
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_requisition, NULL);
gtk_widget_get_allocation (GTK_WIDGET (table), &table_allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (table));
/* Found it */
GtkRequisition req;
- gtk_widget_get_child_requisition (child, &req);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &req, NULL);
+
width = req.width;
height = req.height;
GtkRequisition child_req;
GtkRequisition old_req;
- gtk_widget_get_child_requisition (child->widget, &old_req);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &old_req, NULL);
+
gtk_widget_size_request (child->widget, &child_req);
- gtk_widget_get_child_requisition (child->widget, &child_req);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_req, NULL);
/* Invalidate layout lines if required */
if (priv->layout &&
allocation->x = vc->from_left_of_buffer - text_view->priv->xoffset;
allocation->y = buffer_y - text_view->priv->yoffset;
- gtk_widget_get_child_requisition (vc->widget, &req);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (vc->widget),
+ &req, NULL);
allocation->width = req.width;
allocation->height = req.height;
}
allocation.x = child->x;
allocation.y = child->y;
- gtk_widget_get_child_requisition (child->widget, &child_req);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
+ &child_req, NULL);
+
allocation.width = child_req.width;
allocation.height = child_req.height;
#include "config.h"
+#include "gtktoolbar.h"
+
#include <math.h>
#include <string.h>
#include "gtkseparatormenuitem.h"
#include "gtkseparatortoolitem.h"
#include "gtkstock.h"
-#include "gtktoolbar.h"
+#include "gtksizerequest.h"
#include "gtktoolshell.h"
#include "gtkvbox.h"
#include "gtkprivate.h"
}
border_width += get_internal_padding (toolbar);
-
- gtk_widget_get_child_requisition (GTK_WIDGET (priv->arrow_button),
- &arrow_requisition);
-
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->arrow_button),
+ &arrow_requisition, NULL);
+
shadow_type = get_shadow_type (toolbar);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
if (child && gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (child, &child_requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
hadjustment->upper = MAX (child_requisition.width, view_allocation.width);
}
else
if (priv->need_default_size)
{
- gtk_widget_get_child_requisition (widget, &requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
+ &requisition, NULL);
/* Default to requisition */
*width = requisition.width;
GtkRequisition requisition;
widget = GTK_WIDGET (window);
-
- gtk_widget_get_child_requisition (widget, &requisition);
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget), &requisition, NULL);
geometry_info = gtk_window_get_geometry_info (GTK_WINDOW (widget), FALSE);
if (geometry_info)
*
* Finding these answers would be a bit of a mess here. (Bug #68668)
*/
- gtk_widget_get_child_requisition (geometry_info->widget, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (geometry_info->widget),
+ &child_requisition, NULL);
- gtk_size_request_get_size (GTK_SIZE_REQUEST (widget), &requisition, NULL);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
+ &requisition, NULL);
extra_width = requisition.width - child_requisition.width;
extra_height = requisition.height - child_requisition.height;
}
GtkRequisition child_requisition;
GtkAllocation child_allocation;
- gtk_widget_get_child_requisition (offscreen_box->child1, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (offscreen_box->child1),
+ &child_requisition, NULL);
child_allocation.x = child_requisition.width * (CHILD1_SIZE_SCALE - 1.0) / 2;
child_allocation.y = start_y + child_requisition.height * (CHILD1_SIZE_SCALE - 1.0) / 2;
child_allocation.width = MAX (1, (gint) allocation->width - 2 * border_width);
GtkRequisition child_requisition;
GtkAllocation child_allocation;
- gtk_widget_get_child_requisition (offscreen_box->child2, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (offscreen_box->child2),
+ &child_requisition, NULL);
child_allocation.x = child_requisition.width * (CHILD2_SIZE_SCALE - 1.0) / 2;
child_allocation.y = start_y + child_requisition.height * (CHILD2_SIZE_SCALE - 1.0) / 2;
child_allocation.width = MAX (1, (gint) allocation->width - 2 * border_width);